﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年3月5日
//类描述：实体类 Msg_Sent (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年3月5日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.PreAlarm.Model
{
    /// <summary>
    /// 实体类 Msg_Sent (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "Msg_Sent", PrimaryKey = "Msg_No", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class Msg_SentInfo : BaseModel
    {
        public Msg_SentInfo()
        {            
            PrimaryKey = "Msg_No"; 
			Fields.Add("Msg_No");//Msg_No
			Fields.Add("Msg_Content");//Msg_Content
			
			
			CanNotNullFields.Add("Msg_No");//Msg_No不能为空!				
			
			CanNotNullFields.Add("Msg_Content");//Msg_Content不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public Msg_SentInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
			
        }
        #endregion 
		
		#region 成员变量
				
		private string _Msg_No;//Msg_No
		private string _Msg_Content;//Msg_Content
        private string _SendBy;//Msg_Content
        private DateTime _SendDate;//Msg_Content
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// Msg_No
        /// </summary>       
		[ModelField(Description = "Msg_No", Type = typeof(string), ErrorMessage = "Msg_No信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = true, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Msg_No
        {
            get
            {
                return this._Msg_No;
            }
            set
            {
                if (_Msg_No != value || (_Msg_No == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Msg_Sent", "Msg_No", _Msg_No, value, "varchar", "Msg_No");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnMsg_NoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Msg_No = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnMsg_NoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Msg_No = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// Msg_Content
        /// </summary>       
		[ModelField(Description = "Msg_Content", Type = typeof(string), ErrorMessage = "Msg_Content信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 8000,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Msg_Content
        {
            get
            {
                return this._Msg_Content;
            }
            set
            {
                if (_Msg_Content != value || (_Msg_Content == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Msg_Sent", "Msg_Content", _Msg_Content, value, "varchar", "Msg_Content");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnMsg_ContentChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Msg_Content = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnMsg_ContentChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Msg_Content = value;
                    }
                }
            }
        }

        /// <summary>
        /// SendBy
        /// </summary>       
        [ModelField(Description = "SendBy", Type = typeof(string), ErrorMessage = "SendBy信息错误!", FieldType = FieldType.Normal, IsKeyField = false, IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 8000, DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string SendBy
        {
            get
            {
                return this._SendBy;
            }
            set
            {
                if (_SendBy != value || (_SendBy == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Msg_Sent", "SendBy", _SendBy, value, "varchar", "SendBy");
                        this.OnPropertyChanging(modifyInfo);
                      
                        this.SendPropertyChanging(modifyInfo);

                        this._SendBy = value;

                        this.OnPropertyChanged(modifyInfo);
                     
                        this.SendPropertyChanged(modifyInfo);
                    }
                    else
                    {
                        _SendBy = value;
                    }
                }
            }
        }

        /// <summary>
        /// 设置时间
        /// </summary>       
        [ModelField(Description = "设置时间", Type = typeof(DateTime), ErrorMessage = "设置时间信息错误!", FieldType = FieldType.Normal, IsKeyField = true, IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 8, DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime SendDate
        {
            get
            {
                return this._SendDate;
            }
            set
            {
                if (_SendDate != value || (_SendDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_SetMsg", "SendDate", _SendDate, value, "datetime", "设置时间");
                        this.OnPropertyChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._SendDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);
                    }
                    else
                    {
                        _SendDate = value;
                    }
                }
            }
        }
		


		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnMsg_NoChanging(ModifyInfo modifyInfo);//Msg_NoMsg_No改变之前发生
        partial void OnMsg_NoChanged(ModifyInfo modifyInfo);//Msg_NoMsg_No改变之后发生
		partial void OnMsg_ContentChanging(ModifyInfo modifyInfo);//Msg_ContentMsg_Content改变之前发生
        partial void OnMsg_ContentChanged(ModifyInfo modifyInfo);//Msg_ContentMsg_Content改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("Msg_Sent", "Msg_No", Msg_No);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("Msg_Sent", "Msg_No", Msg_No);		
			ManageEditURI = ZModel.InitMEditURI("Msg_Sent", "Msg_No", Msg_No);	
		 	ManageDetailURI = ZModel.InitMDetailURI("Msg_Sent", "Msg_No", Msg_No);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}